<html>
<head>
  <link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
  <div class="main">
    <h1>Namespace: joker.walk</h1>
    <span class="var-added">v1.0</span>
    <h2>Contents</h2>
    <ul>
      <li>
        <a href="#_summary">Summary</a>
      </li>
      <li>
        <a href="#_index">Index</a>
      </li>
      <li>
        <a href="#_constants">Constants</a>
      </li>
      <li>
        <a href="#_variables">Variables</a>
      </li>
      <li>
        <a href="#_functions">Functions, Macros, and Special Forms</a>
      </li>
    </ul>
    <h2 id="_summary">Summary</h2>
    <p class="var-docstr">Defines a generic tree walker for Clojure data structures.<br>
         Takes any data structure (list, vector, map, set, seq), calls<br>
         a function on every element, and uses the return value of the<br>
         function in place of the original.  This makes it fairly easy<br>
         to write recursive search-and-replace functions, as shown in<br>
         the examples.<br>
<br>
         Note: &#34;walk&#34; supports all Clojure data structures EXCEPT maps<br>
         created with sorted-map-by.  There is no (obvious) way to retrieve<br>
         the sorting function.</p>
    <h2 id="_index">Index</h2>
    <ul class="index">
      <li>
  <a href="#keywordize-keys">keywordize-keys</a>
</li>
<li>
  <a href="#macroexpand-all">macroexpand-all</a>
</li>
<li>
  <a href="#postwalk">postwalk</a>
</li>
<li>
  <a href="#postwalk-demo">postwalk-demo</a>
</li>
<li>
  <a href="#postwalk-replace">postwalk-replace</a>
</li>
<li>
  <a href="#prewalk">prewalk</a>
</li>
<li>
  <a href="#prewalk-demo">prewalk-demo</a>
</li>
<li>
  <a href="#prewalk-replace">prewalk-replace</a>
</li>
<li>
  <a href="#stringify-keys">stringify-keys</a>
</li>
<li>
  <a href="#walk">walk</a>
</li>

    </ul>
    <h2 id="_constants">Constants</h2>
    Constants are variables with <tt>:const true</tt> in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.
    <ul>
      (None.)
    </ul>
    <h2 id="_variables">Variables</h2>
    <ul>
      (None.)
    </ul>
    <h2 id="_functions">Functions, Macros, and Special Forms</h2>
    <ul>
      <li>
  <h3 class="Function" id="keywordize-keys">keywordize-keys</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(keywordize-keys m)</code></div>
</pre>
  <p class="var-docstr">Recursively transforms all map keys from strings to keywords.</p>
  <a href="https://github.com/candid82/joker/blob/master/core/data/walk.joke#L97">source</a>
  
</li>
<li>
  <h3 class="Function" id="macroexpand-all">macroexpand-all</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(macroexpand-all form)</code></div>
</pre>
  <p class="var-docstr">Recursively performs all possible macroexpansions in form.</p>
  <a href="https://github.com/candid82/joker/blob/master/core/data/walk.joke#L129">source</a>
  
</li>
<li>
  <h3 class="Function" id="postwalk">postwalk</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(postwalk f form)</code></div>
</pre>
  <p class="var-docstr">Performs a depth-first, post-order traversal of form.  Calls f on<br>
  each sub-form, uses f&#39;s return value in place of the original.<br>
  Recognizes all Clojure data structures. Consumes seqs as with doall.</p>
  <a href="https://github.com/candid82/joker/blob/master/core/data/walk.joke#L56">source</a>
  
</li>
<li>
  <h3 class="Function" id="postwalk-demo">postwalk-demo</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(postwalk-demo form)</code></div>
</pre>
  <p class="var-docstr">Demonstrates the behavior of postwalk by printing each form as it is<br>
  walked.  Returns form.</p>
  <a href="https://github.com/candid82/joker/blob/master/core/data/walk.joke#L83">source</a>
  
</li>
<li>
  <h3 class="Function" id="postwalk-replace">postwalk-replace</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(postwalk-replace smap form)</code></div>
</pre>
  <p class="var-docstr">Recursively transforms form by replacing keys in smap with their<br>
  values.  Like clojure/replace but works on any data structure.  Does<br>
  replacement at the leaves of the tree first.</p>
  <a href="https://github.com/candid82/joker/blob/master/core/data/walk.joke#L121">source</a>
  
</li>
<li>
  <h3 class="Function" id="prewalk">prewalk</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(prewalk f form)</code></div>
</pre>
  <p class="var-docstr">Like postwalk, but does pre-order traversal.</p>
  <a href="https://github.com/candid82/joker/blob/master/core/data/walk.joke#L64">source</a>
  
</li>
<li>
  <h3 class="Function" id="prewalk-demo">prewalk-demo</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(prewalk-demo form)</code></div>
</pre>
  <p class="var-docstr">Demonstrates the behavior of prewalk by printing each form as it is<br>
  walked.  Returns form.</p>
  <a href="https://github.com/candid82/joker/blob/master/core/data/walk.joke#L90">source</a>
  
</li>
<li>
  <h3 class="Function" id="prewalk-replace">prewalk-replace</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(prewalk-replace smap form)</code></div>
</pre>
  <p class="var-docstr">Recursively transforms form by replacing keys in smap with their<br>
  values.  Like clojure/replace but works on any data structure.  Does<br>
  replacement at the root of the tree first.</p>
  <a href="https://github.com/candid82/joker/blob/master/core/data/walk.joke#L113">source</a>
  
</li>
<li>
  <h3 class="Function" id="stringify-keys">stringify-keys</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(stringify-keys m)</code></div>
</pre>
  <p class="var-docstr">Recursively transforms all map keys from keywords to strings.</p>
  <a href="https://github.com/candid82/joker/blob/master/core/data/walk.joke#L105">source</a>
  
</li>
<li>
  <h3 class="Function" id="walk">walk</h3>
  <span class="var-kind Function">Function</span>
  <span class="var-added">v1.0</span>
  <pre class="var-usage"><div><code>(walk inner outer form)</code></div>
</pre>
  <p class="var-docstr">Traverses form, an arbitrary data structure.  inner and outer are<br>
  functions.  Applies inner to each element of form, building up a<br>
  data structure of the same type, then applies outer to the result.<br>
  Recognizes all Clojure data structures. Consumes seqs as with doall.</p>
  <a href="https://github.com/candid82/joker/blob/master/core/data/walk.joke#L36">source</a>
  
</li>

    </ul>
  </div>
</body>
<script src="main.js"></script>
</html>
